package com.itheima.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dto.UserLoginDto;
import com.itheima.service.UserService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yunfei
 * @date 2022年10月14日 9:47
 */
@RestController
@RequestMapping("api/v1/login")
public class UserController {

    @Autowired
    private UserService userService;

    /**
     * APP 端用户登录接口
     *
     * @return
     */
    @PostMapping("login_auth")
    public ResponseResult login_auth(@RequestBody UserLoginDto loginDto) {
        return userService.loginAuth(loginDto);
    }

}
